
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <TypeLength.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(TypeLength)
{

	TEST(input value keep 0.01 precision with cuting: 1.123 = 1.12)
	{
		TypeLength value(1.123);
		double inputValue = value.getInputValue();
		ASSERT_EQ(inputValue,1.12);
	}

	TEST(input value keep 0.01 precision with cuting: 1.126 = 1.12)
	{
		TypeLength value(1.126);
		double inputValue = value.getInputValue();
		ASSERT_EQ(inputValue,1.12);
	}

	TEST(output value keep 0.01 precision with calculation: 1.123 = 1.12)
	{
		TypeLength value(1.123);
		double outputValue = value.getOutputValue();
		ASSERT_EQ(outputValue,1.12);
	}

	TEST(output value keep 0.01 precision with calculation: 1.126 = 1.13)
	{
		TypeLength value(1.126);
		double outputValue = value.getOutputValue();
		ASSERT_EQ(outputValue,1.13);
	}
};
